
list1 = [1,2,3]  #可迭代对象  __iter__


# 迭代器 是属于可迭代对象 ，可以for循环迭代
#有__next__方法的可迭代对象就是一个迭代器

print (dir (list1))

it = iter(list1)

print (dir (it))
# print (it.__next__ ())
# print (it.__next__ ())
# print (it.__next__ ())
# print (next (it)) #1
# print (next (it)) #2
# print (next (it))
# print (next (it))
# print(list(it))
# print(list(it))
for i in it:
    print (i)